package de.hszigr.inf.persistenzschicht;

import java.util.List;
import java.util.Vector;

import de.hszigr.inf.model.Task;
import de.hszigr.inf.model.User;

public class Dao {

	public Dao() {
	
	}
	
	public User isUser(String username, String password){
		
		return InMemoryDB.getUser(username, password);
		
	}
	
	public List<User> getAllUser(){
		return InMemoryDB.getAllUser();
	}
	
	public void saveUser(User u){
		InMemoryDB.saveUser(u);
	}
	
	public User getUser(String username){
		return InMemoryDB.getUser(username);
	}
	
	public void deleteUser(String username){
		InMemoryDB.deleteUser(username);
	}
	
	public void editUser(User alt, User neu){
		InMemoryDB.editUser(alt, neu);
	}
	
	
	public Vector<Task> getAllTasks(){
		return InMemoryDB.getAllTasks();
	}
	
	public Vector<Task> getTaskByUsername(String username){
		return InMemoryDB.getTaskByUsername(username);
	}
	
	public Task getTaskById(String id){
		return InMemoryDB.getTaskById(id);
	}
	
	public void saveTask(Task task){
		InMemoryDB.saveTask(task);
	}
	
	public void deleteTask(String id){
		InMemoryDB.deleteTask(id);
	}
}
